home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.protocols.tcp-ip
- Path: in2.uu.net!etnibsd!sandeep
- From: sandeep@etnibsd.uucp (Sandeep Pathak)
- Subject: Socket classes and fork()
- Message-ID: <1996Jan15.192235.21245@etnibsd.uucp>
- Keywords: sockets, C++, fork
- Reply-To: sandeep%etnibsd@uunet.uu.net
- Organization: Eaton Ion Beam Systems Div., Beverly, MA
- Date: Mon, 15 Jan 1996 19:22:35 GMT
-
- Hi netters,
- My apologies if this is a repost. I wasnt sure my first posting went thru.
- I am writing simple C++ classes/wrappers for sockets and related
- networking abstractions. I have modeled my classes mostly on the
- traditional structures and function calls, but I got stumped by "fork()".
- My Socket class also has a reference count similar to that maintained
- by the kernel for a socket descriptor. But how do I maintain this count
- if a fork() is done? I can not think of anyway of maintaining
- consistency w/ the kernel count unless there is some parent <-> child
- IPC for the Socket object. Anybody want to share some experiences?..
- I am sure there are a lot of people who have written/dealt w/ C++
- wrappers for IPC and networking.
- At this point (without some research) I would lamely contend that my
- Socket abstraction will not be in a proper state if concurrent servers
- are written w/ it.
- Please prove me wrong..!
-
- thanks in advance!
- -sandeep
- spathak@bev.etn.com
- -----------------------------------------------------------------
- Sandeep Pathak ! secs: (508)921-9696
- Eaton Corporation ! mins: (508)927-3652
- Semiconductor Equipment Div. ! hrs : spathak@bev.etn.com
- "Whatever u can do or dream u ! days: 108 Cherry Hill Drive
- can do..begin it" -- Goethe ! Beverly MA 01915
- -----------------------------------------------------------------
-